/** @type {import("ts-jest/dist/types").InitialOptionsTsJest} */
module.exports = {
  preset: "ts-jest",
  testEnvironment: "jsdom", // 生成的时候是node, 会报 Error ReferenceError: document is not defined.
  transform: {
    "^.+\\.vue$": "@vue/vue3-jest",
    "^.+\\.ts$": "ts-jest",
  },
  testMatch: ["<rootDir>/tests/unit/*.spec.ts"],
  // 全局 alias
  moduleNameMapper: {
    "^@/(.*)$": "<rootDir>/src/$1",
  },
};
